package com.ruicar.afs.cloud.workflow.greatwall.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruicar.afs.cloud.workflow.greatwall.entity.AfsGreatWallTaskAssignInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface AfsGreatWallTaskAssignInfoMapper extends BaseMapper<AfsGreatWallTaskAssignInfo> {
    @Update("delete from afs_greatwall_task_assign_info where flow_service_id=#{serviceId} and biz_data_id=#{bizDataId} ")
    int clearFailInfo(@Param("serviceId") String serviceId, @Param("bizDataId") String bizDataId);

    @Select("select assign_name from afs_greatwall_task_assign_info where flow_service_id=#{serviceId} and biz_data_id=#{bizDataId}  order by create_time desc limit 0,1")
    String queryLastAssignUser(@Param("serviceId") String serviceId, @Param("bizDataId") String bizDataId);
}
